import React from 'react';

const filterProps = (WrappedComponent:any, filteredProps:any) => {
    return ({ ...props }) => {
        const newProps = { ...props };

        filteredProps.forEach((prop:any) => {
            delete newProps[prop];
        });

        return <WrappedComponent {...newProps} />;
    };
};

export default filterProps;
